﻿using VIFON.DAL;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace VIFON.BLL
{
    public class BLCustomer
    {
        static DACustomer daCustomer = new DACustomer();
        internal List<Customer> GetCustomers(string keyWord)
        {
            return daCustomer.GetCustomers(keyWord);
        }
        internal List<Customer> GetCustomersList()
        {
            return daCustomer.GetCustomersList();
        }
        internal Customer GetCustomerById(int id)
        {
            return daCustomer.GetCustomerbyId(id);
        }
        internal bool Insert(Customer boCustomer)
        {
            if (string.IsNullOrEmpty(boCustomer.TaxCode))
                boCustomer.TaxCode = "////////";

            return daCustomer.Insert(boCustomer);
        }
        internal bool Update(Customer boCustomer)
        {
            return daCustomer.Update(boCustomer);
        }

        internal bool Delete(int id)
        {
            return daCustomer.Delete(id);
        }
    }
}
